#ifndef IMAGEMODEL_H
#define IMAGEMODEL_H
#include <QImage>
#include <QAbstractItemModel>
#include <QTableView>

class ImageTabel: public QTableView{
public:
    ImageTabel(QWidget* parent = 0);
};

class ImageModel: public QAbstractItemModel
{
public:
    ImageModel(QImage img = QImage());
    void setImage(QImage img);
    int columnCount ( const QModelIndex & parent = QModelIndex() ) const;
    QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
    QModelIndex index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const;
    QModelIndex parent ( const QModelIndex & index ) const;
    int rowCount ( const QModelIndex & parent = QModelIndex() ) const;
public:
    QImage image;
    int width;
    int height;
};

#endif // IMAGEMODEL_H
